<?php
require_once 'subpage.class.php';
require_once('Http_do.php');
header("Content-Type:text/html; charset=utf-8");
echo '<div><form><input type="text" name="channel" value=""><input type="submit" value="查询Channel"></form></div>';
		if(isset($_GET['p'])){
				$p = $_GET['p'];
		}else{
			$p=1;	
		}
		$where = '';
		$url = 'list.php?p=';
		$channel=empty($_GET['channel'])?'':trim($_GET['channel']);
		
		$interface_return=Http_do::doPost($interface_url,array('type'=>6,'channel'=>$channel));
		$count=json_decode($interface_return,true);
		
		$page_size = 15;  //每页显示的条数     
		$nums = $count['nums'];   //总条数 
		$sub_pages = $nums/$page_size + 1;  //得到当前是第几页  
		$pageCurrent=$p;  //当前页数
		if(!$pageCurrent) $pageCurrent=1;//如果没设定页数默认是第一页     
		$subPages=new SubPages($page_size,$nums,$pageCurrent,$sub_pages,$url,1);
		//例如要分页格式如comments.php?p=1,最后一个参数为分页的样式
		$start = ($pageCurrent - 1)* $page_size;
		
		echo Http_do::doPost($interface_url,array('type'=>7,'channel'=>$channel,'start'=>$start,'page_size'=>$page_size));
		
echo <<<HTML
	</table>
	<table width="80%" border="0">
		<tr>  
			<td valign="MIDDLE">                                                                                      
			
			</td>
		</tr>
	</table>    
	</body>
	</html> 
HTML;
?>